{{#if (eq flag "callFlag")}}
<div class="col-md-12">
	<div class="box margin-middle max-width">
		<!-- BOX-BODY -->
		<div class="box-body">
			{{#bs-form formLayout=formLayout model=warningModel action=(action "saveWarning") invalid=(action "invalid")}}
			<!-- 列表编辑-->
			<div class="row">
				<div class="col-xs-12">
					<p class="user-add-btn">
						{{#if detailEdit}}
						{{else}}
							{{#ui/form-function editAction="detailEditClick" detailEditClick="detailEditClick" removeAction="delById" delById="delById" }}
							{{/ui/form-function}}
						{{/if}}
					</p>
				</div>
					<div class="col-xs-12 nopadding-horizontal mt20">
						<div class="col-xs-12 col-sm-6">
							<div class="form-input-group">
								<span class="input-group-addon">用户姓名：</span>
								{{#if detailEdit}}
                {{#if flagEdit}}
									<div class="input-group-content">{{warningModel.caller.name}}</div>
									{{else}}
										{{#bs-form-element class="inline-block form-input-group" controlType="caller"  property="caller" }}
		                  {{#power-select class="inline-block input-group-content" placeholder="必填项" options=customerList selected=defaultCustomer searchField="namePinyin" noMatchesMessage="没有相关内容"
		                  allowClear=false onchange=(action "selectParent" ) as |name|}}
							        {{name.name}}
							        {{/power-select}}
										{{/bs-form-element}}
									{{/if}}
								{{else}}
									<div class="input-group-content">{{warningModel.caller.name}}</div>
								{{/if}}
		           </div>

						</div>
						<div class="col-xs-12 col-sm-6">
							<div class="form-input-group">
								<span class="input-group-addon">床&nbsp;位&nbsp;&nbsp;号：</span>
								{{#if detailEdit}}
									{{#if flagEdit}}
									<div class="input-group-content">{{warningModel.caller.bed.roomBedName}}</div>
									{{else}}
									<div class="input-group-content">{{defaultCustomer.bed.roomBedName}}</div>
									{{/if}}
								{{else}}
									<div class="input-group-content">{{warningModel.caller.bed.roomBedName}}</div>
								{{/if}}
							</div>

						</div>

						<div class="col-xs-12 col-sm-6">
							<div class="form-input-group">
								<span class="input-group-addon">时&emsp;&emsp;间：</span>
								{{#if detailEdit}}
										{{ui/addon/bs-datetimepicker date=warningModel.callTimeDate placeholder=""
											locale="zh-CN" iconClasses="fa fa-calendar" maxDate=today
											 show="dpShowAction" change="changeCallTimeAction" }}
								{{else}}
									<div class="input-group-content">{{warningModel.callTimeString}}</div>
								{{/if}}
							</div>

						</div>
						<div class="col-xs-12 col-sm-6">
		          <div class="form-input-group">
		            <span class="input-group-addon">预警说明：</span>
								{{#if detailEdit}}
									{{input  class="input-group-content" value=warningModel.reason}}
								{{else}}
									<div class="input-group-content">{{warningModel.reason}}</div>
								{{/if}}
		          </div>

		        </div>
		        <div class="col-xs-12 col-sm-6">
		          <div class="form-input-group">
		            <span class="input-group-addon">处&nbsp;理&nbsp;&nbsp;人：</span>
								{{#if detailEdit}}
									{{#bs-form-element class="inline-block form-input-group" controlType="operater"  property="operater" }}
						        {{#power-select class="input-group-content" placeholder="必填项" options=staffList selected=defaultStaff
										searchField="operaterPinyin" noMatchesMessage="没有相关内容"
						          allowClear=true onchange=(action "selectStaff" ) as |staff|}}
						          {{staff.name}}
						        {{/power-select}}
									{{/bs-form-element}}
				        {{else}}
				        <div class="font-light input-group-content">{{warningModel.operater.name}}</div>
				          {{/if}}

		          </div>

		        </div>
		        <div class="col-xs-12 col-sm-6">
		          <div class="form-input-group">
		            <span class="input-group-addon">处理状态：</span>
								{{#if detailEdit}}
									{{#bs-form-element class="inline-block form-input-group" controlType="flag"  property="flag" }}
										{{#power-select class="input-group-content" placeholder="必填项" options=flagList selected=warningModel.flag
										 noMatchesMessage="没有相关内容" allowClear=true onchange=(action "selectFlag" ) as |flag|}}
						          {{flag.typename}}
						        {{/power-select}}
									{{/bs-form-element}}
								{{else}}
									<div class="input-group-content">{{warningModel.flag.typename}}</div>
								{{/if}}
		          </div>

		        </div>
						<div class="col-xs-12 col-sm-12">
		          <div class="form-input-group">
		            <span class="input-group-addon">处理说明：</span>
								{{#if detailEdit}}
									{{textarea type="text" class="full-width inline-block form-input-group label-normal form-control" value=warningModel.operateNote}}
								{{else}}
									<div class="input-group-content">{{warningModel.operateNote}}</div>
								{{/if}}
		          </div>
		        </div>
					</div>
			</div>
			<!-- 列表编辑 -->
			<div class="padding-top30 center">
				<p class="text-center user-add-btn margin0auto inlineBlock">
					{{#if detailEdit}}
					{{#ui/mix-button class="user-btn edit-btn" iconClass="fa fa-check"  text='保存' }}
					{{/ui/mix-button}}
					{{#ui/mix-button class="user-btn times-btn" iconClass="fa fa-mail-reply"  text='取消'  clickAction="detailCancel" detailCancel="detailCancel" }}
					{{/ui/mix-button}}
					{{/if}}
				</p>
			</div>
			{{/bs-form}}
		</div>
		<!-- /BOX-BODY -->
	</div>
</div>
{{else}}
<div class="col-md-12">
	<div class="box margin-middle max-width">
		<!-- BOX-BODY -->
		<div class="box-body">
			<!-- 列表编辑-->
			<div class="row">
					<div class="col-xs-12 nopadding-horizontal mt20">
		        <div class="col-xs-12 col-sm-6">
		          <div class="form-input-group">
		            <span class="input-group-addon">用户姓名：</span>
								<div class="input-group-content">{{sleepmessage.customer.name}}</div>
		          </div>
		        </div>
		        <div class="col-xs-12 col-sm-6">
		          <div class="form-input-group">
		            <span class="input-group-addon">床位号：</span>
								<div class="input-group-content">{{sleepmessage.bed.roomBedName}}</div>
		          </div>
		        </div>
		        <div class="col-xs-12 col-sm-6">
		          <div class="form-input-group">
		            <span class="input-group-addon">统计日期：</span>
								<div class="input-group-content">{{sleepmessage.createDateStr}}</div>
		          </div>
		        </div>
		        <div class="col-xs-12 col-sm-6">
		          <div class="form-input-group">
		            <span class="input-group-addon">深睡眠时长：</span>
								<div class="input-group-content">{{sleepmessage.deepSleepMinsFormat}}</div>
		          </div>
		        </div>
		        <div class="col-xs-12 col-sm-6">
		          <div class="form-input-group">
		            <span class="input-group-addon">浅睡眠时长：</span>
								<div class="input-group-content">{{sleepmessage.lightSleepMinsFormat}}</div>
		          </div>
		        </div>
		        <div class="col-xs-12 col-sm-6">
		          <div class="form-input-group">
		            <span class="input-group-addon">总睡眠时长：</span>
								<div class="input-group-content">{{sleepmessage.allSleepMinsFormat}}</div>
		          </div>
		        </div>
					</div>
			</div>

			<div id="datatable1_wrapper" class="dataTables_wrapper form-inline" role="grid">
	      <table id="datatable1" cellpadding="0" cellspacing="0" border="0"  class="datatable table table-bordered table-hover dataTable mt15" aria-describedby="datatable1_info">
	        <thead>
	          <tr role="row">
	            <th rowspan="1" colspan="1" width="">用户姓名</th>
	            <!-- <th rowspan="1" colspan="1" width="">床位号</th> -->
              <th rowspan="1" colspan="1" class="" width="">开始时间</th>
              <th rowspan="1" colspan="1" class="" width="">结束时间</th>
	            <th rowspan="1" colspan="1" width="">说明</th>
	          </tr>
	        </thead>
	        {{#if warningList}}
	      <tbody role="alert" aria-live="polite" aria-relevant="all" class="">
	          {{#each warningList as |warning|}}
	          <tr class="gradeA odd">
	            <td class=" ellipsis sorting_1">{{warning.caller.name}}</td>
	            <!-- <td class=" ellipsis ">{{warning.bed.roomBedName}}</td> -->
              <td class=" ellipsis">{{warning.startTimeStr}}</td>
              <td class=" ellipsis">{{warning.endTimeStr}}</td>
	            <td class=" ellipsis ">{{warning.reason}}</td>
	      	  </tr>
	          {{/each}}
	       </tbody>
	       {{else}}
	       {{/if}}
	        </table>
	        {{#if warningList }}
	            {{page-numbers content=warningList showFL=true numPagesToShow=5}}
	            {{else}}
	                <h1 class="col-sm-12 center unTask"></h1>
	        {{/if}}
	      </div>


		</div>
		<!-- /BOX-BODY -->
	</div>
</div>
{{/if}}
